.TH std::atomic_flag::atomic_flag 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_flag::atomic_flag \- std::atomic_flag::atomic_flag

.SH Synopsis
   Defined in header <atomic>
   atomic_flag() noexcept = default;                   \fI(since C++11)\fP
                                               \fB(1)\fP     \fI(until C++20)\fP
   constexpr atomic_flag() noexcept;                   \fI(since C++20)\fP
   atomic_flag( const atomic_flag& ) = delete;     \fB(2)\fP \fI(since C++11)\fP

   Constructs a new std::atomic_flag.

   1) Trivial default constructor, initializes std::atomic_flag to        \fI(until C++20)\fP
   unspecified state.
   1) Initializes std::atomic_flag to clear state.                        \fI(since C++20)\fP

   2) The copy constructor is deleted; std::atomic_flag is not copyable.

   In addition, std::atomic_flag can be value-initialized to clear state with the
   expression ATOMIC_FLAG_INIT. For an atomic_flag with static storage duration, this
   guarantees static initialization: the flag can be used in constructors of static
   objects.

.SH See also

   ATOMIC_FLAG_INIT initializes an std::atomic_flag to false
   \fI(C++11)\fP          (macro constant)
